home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / edit / read409.zip / READ.DOC < prev    next >
Text File  |  1994-09-05  |  12KB  |  283 lines

  1. READ.DOC
  2. 09/05/94
  3.  
  4. Program written by:
  5.                         Bruce Guthrie
  6.                         Room H-4885
  7.                         U.S. Dept of Commerce/ESA/OBA/BSISD
  8.                         Washington, D.C. 20230
  9.  
  10.                         (202) 482-3234
  11.  
  12. You may freely copy and re-distribute this program; however, the U.S.
  13. Department of Commerce neither guarantees nor assures compatibility of the
  14. program with all computer software or hardware.
  15.  
  16. Foreign users:  Please provide an Internet e-mail address in all correspondence
  17. or and just e-mail your problems to me at bgu@cu.nih.gov
  18.  
  19.  
  20. READ allows you to view any ASCII text document with 16,000 lines or less (about
  21. 900,000 bytes).  You can also search for text within a document, scroll around
  22. in the document, and split up big files into small files for printing or copying
  23. to another file.
  24.  
  25. READ supports a mouse scroll bar at the top if a compatible mouse is detected.
  26.  
  27. READ handles DOS text files (lines end with CR/LF), Mac text files (lines end
  28. with CR), or Unix text files (lines end with LF).
  29.  
  30.  
  31. The READ.INI file:
  32.  
  33. READ will read a READ.INI file if one is found.  (You can specify a different
  34. file name if desired.) The file is an ASCII text file that can be created
  35. maintained by hand.  The file can consist or one or more command line
  36. parameters (only those that begin with a "/"), one statement per line.
  37.  
  38. You can use the free READINIT.EXE program to set up this READ.INI file or you
  39. can create it by hand.
  40.  
  41. The file can also contain comments which are blank lines or any line beginning
  42. with:
  43.         ;    (semi-colon)
  44.         :    (colon)
  45.         '    (quote)
  46.  
  47. READ looks for the initialization file in your default subdirectory first.  It
  48. then searches for it in the subdirectory where the executable was and then goes
  49. through your DOS path.
  50.  
  51. Passing in "/-I" or "/INULL" skips loading the READ.INI file.
  52.  
  53.  
  54.  
  55. Syntax:
  56.  
  57.     READ [ filespec | @flistfile ] [ /TITLE="title" ] [ /DATE=NONE ]
  58.       [ /line ] [ /MONO | /COLOR ] [ /EGA | /VGA ] [ /-MOUSE ] [ /DOS | /-DOS ]
  59.       [ /Iinitfile | /-I ] [ /Q ] [ /PORT=port ] [ /INITT=string ]
  60.       [ /INITW=string ] [ /AFTERP=string ] [ /AFTERF=string ]
  61.       [ /COLOR=nnn nnn nnn nnn ] [ /? ]
  62.  
  63. where:
  64.  
  65. "filespec" is the file specification you want to view.  You can use a path
  66. specification and a single wildcard if you'd like.  It defaults to three
  67. wildcard selections; *.DOC, *.TXT, and *.BAT.  If more than one document in the
  68. directory matches the wildcard, you can switch back and forth between documents
  69. with Ctrl-PgUp and Ctrl-PgDn.
  70.  
  71. "@flistfile" is a text file that contains the names of any files you want READ
  72. to process.  The text file should contain one filename, with path if desired,
  73. per line.  You can include an optional title after any of the file name
  74. references (see /TITLE="title" option).
  75.  
  76. "/TITLE="title" " lets you specify an optional descriptive title to appear at
  77. the bottom of the screen instead of the file name.  The title can be up to 29
  78. characters in length unless /PAGE=NONE is specified in which case it can be up
  79. to 44 characters in length.  Multi-word titles should appear in quotation marks.
  80.  
  81. "/DATE=NONE" says to leave off the date-time stamp for the file on the status
  82. line.  This allows a user-defined title to be up to 44 characters in length.
  83.  
  84. "/line" puts line "line" at the top of the screen.  Only applicable if
  85. "filespec" (vs "@flistfile") is used.
  86.  
  87. "/MONO" (or "/-COLOR") forces the system into monochrome mode.
  88.  
  89. "/COLOR" or "/-MONO" forces the system into color mode.  This is typically the
  90. default.
  91.  
  92. "/EGA" or "/VGA" will put you in 43/50-line mode if your monitor supports this.
  93. The two options are actually synonymous (you'll get the best your monitor
  94. supports).  You can also switch to and from 25-line and 43/50-line mode within
  95. the program by using Alt-E.
  96.  
  97. "/-MOUSE" says to present the non-mouse menu bar even if a mouse is present.
  98.  
  99. "/DOS" allows access to the jump to DOS feature of the program.  This is
  100. typically the default.
  101.  
  102. "/-DOS" prohibits jumping to DOS.
  103.  
  104. "/Iinitfile" says to read an initialization file with the file name "initfile".
  105. The file specification *must* contain a period.  If no drive or path information
  106. is specified, the program will search for initfile beginning in your default
  107. subdirectory and then going throughout your DOS path.  The use of an
  108. initialization file is optional.  Initially defaults to "/IREAD.INI".
  109.  
  110. "/-I" (or "/INULL") says to skip loading the READ.INI initialization file.
  111.  
  112.  
  113. "/Q" suppresses a message that shows up while the program searches for your
  114. initfile.
  115.  
  116. "/PORT=port" specifies the printer port to use for printing.  This typically
  117. defaults to /PORT=LPT1: although this can be overridden by the READ.INI file.
  118.  
  119. "/INITT=string"("initialize thin") provides the string that will be sent to the
  120. printer before printing if all lines in the document are 80 characters or less
  121. in length.  The string can include regular characters.  Special characters are
  122. entered by using their three-character ASCII numeric code preceded by a
  123. backslash.  "\027" is the code for the special character Escape.  You can
  124. specify /INITT=NULL if desired.  Defaults to "/INITT=NULL".
  125.  
  126. "/INITW=string" ("initialize wide") provides the string that will be sent to the
  127. printer before printing if any lines in the document (not just the section
  128. printed) exceed 80 characters in length.  See "/INITT=string" description.
  129. Defaults to "/INITW=NULL".
  130.  
  131. For a Hewlett-Packard LaserJet, the following codes would typically be used:
  132.         /INITT=\027E             (portrait mode, 80 column)
  133.         /INITW=\027E\027(s16.66H (portrait mode, 132 column)
  134.  
  135. "/AFTERP=string" specifies the string to print after a partial document is
  136. printed.  This string can include a page eject character ("\012") or any printer
  137. reset codes ("\012\027E") you want.  Initially defaults to "/AFTERP=\012".
  138.  
  139. "/AFTERF=string" specifies the string to print after a full document is printed.
  140. See "/AFTERP=string" description.  Defaults to "/AFTERF=\012".
  141.  
  142. "/COLOR=nnn nnn nnn nnn" specifies the color settings to use for (in order) (1)
  143. regular text, (2) the status line, (3) marked text, and (4) found text.  Each
  144. setting must consist of three digits, the first two being the foreground color
  145. and the last being the background color.  The foreground color should be padded
  146. on the left with a 0 if it is only one digit in length.  Defaults to "/COLOR=150
  147. 151 157 143".
  148.  
  149. Foreground colors:
  150.  
  151.         Low intensity           High intensity
  152.  
  153.         0 = black                8 = dark grey
  154.         1 = blue                 9 = light blue
  155.         2 = green               10 = light green
  156.         3 = cyan                11 = light cyan
  157.         4 = red                 12 = light red
  158.         5 = magenta             13 = light magenta
  159.         6 = brown               14 = light yellow
  160.         7 = white               15 = bright white
  161.  
  162. Adding 16 to any color will make the text blink.  Background colors can consist
  163. of 0 to 7 above.  Bright white on blue, for example, would be "151".
  164.  
  165. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  166.  
  167.  
  168.  
  169. Return codes:
  170.  
  171. READ returns the following ERRORLEVEL codes:
  172.         0 = no problems
  173.       254 = input file(s) not found
  174.       255 = syntax problems, or /? requested
  175.  
  176.  
  177. Viewing options:
  178.  
  179. While you're viewing a document with the READ command, you can use the following
  180. keys:
  181.  
  182. Cursor movement keys (up/down):
  183.  
  184. Up                moves up one line
  185. Down              moves down one line
  186. Home              moves to the top line of the document
  187. End               moves to the bottom line of the document
  188. PgUp              moves up one screen's worth
  189. PgDn              moves down one screen's worth
  190. #line or Gline    moves to the given line in the document (goto line)
  191. +line             moves forward a number of lines
  192. -line             moves backward a number of lines
  193.  
  194. Cursor movement keys (right/left):
  195.  
  196. Right             moves one column to the right
  197. Left              moves one column to the left
  198. Tab               moves 8 columns to the right
  199. Shift-Tab         moves 8 columns to the left
  200. Ctrl-Right        moves to the far right of the document
  201. Ctrl-Left         moves to the far left of the document
  202.  
  203.  
  204. Search for text:
  205.  
  206. \ or F or f       search for text within the document
  207.                   (the search is case-insensitive; "/COMMERCE" will find
  208.                   "Commerce", "commerce", and "COMMERCE")
  209. /                 search for exact (case-sensitive) text within the document
  210. F3                search for the next occurrence of that text
  211. F9                search for the previous occurrence of that text
  212.  
  213. Marking lines:
  214.  
  215. Alt-M             mark top line for copy or print
  216. Alt-B             mark bottom line for copy or print
  217. Alt-U             unmark all lines
  218.  
  219. Copying/printing lines (can copy/print either marked lines, all lines, or just
  220. the lines that are currently on the screen):
  221.  
  222. Alt-C or Alt-D    copy (duplicate) lines to a file
  223. Alt-P             print lines
  224.  
  225. Next/previous documents:
  226.  
  227. Ctrl-PgUp         go to the previous file viewed
  228. Ctrl-PgDn         go to the next file specified on the input line
  229.  
  230. Miscellaneous:
  231.  
  232. Alt-E             toggles between 25-line and 43-/50-line mode (if your system
  233.                   supports EGA and VGA respectively)
  234. Alt-J or Alt-G    jumps (goes) to DOS; say EXIT to get back to program;
  235.                   this feature can be turned off using the /-DOS switch
  236. Alt-R             shows ruler at the top of the listing
  237. Ctrl-P or Ctrl-F  do a form feed to the printer
  238. F1                get help screen (which also includes some other statistical
  239.                   information like the size of the file in bytes)
  240. Esc               leave READ program
  241.  
  242. Note that you can't view beyond the beginning or end of the document.  This is
  243. obvious but you cannot scroll to the right if you're already seeing the far
  244. right of the display.
  245.  
  246.  
  247.  
  248. Marking and copying text:
  249.  
  250. If you need to copy a portion of your file to the printer or to another text
  251. file, you will typically want to mark sections of the text first.  This is done
  252. using the mark functions:  Alt-M marks the top line on the screen and Alt-B
  253. marks the bottom line on the screen.
  254.  
  255. For example, you might decide that you have a 2,000-line document and you want
  256. to print 50 lines of it.  Go to the first line you want to print or copy (you
  257. can use the search options if you want to).  Get that line at either the top of
  258. the screen or the bottom of the screen.  If it's the bottom line, press Alt-B;
  259. if it's the top line, press Alt-M.
  260.  
  261. Now go to the last line you want to print or copy.  Again, get that line at
  262. either the top of the screen or the bottom of the screen and press Alt-B or
  263. Alt-M appropriately.  Having marked two lines, the program tags those lines and
  264. all those lines between them.  You can use the F1 (help) key; it will tell you
  265. the first and last lines that are marked.
  266.  
  267. Now press Alt-C (or Alt-D) to Copy the lines elsewhere or Alt-P to print them.
  268. When you select these functions, you'll be asked if you want to process the
  269. whole file, just those lines on the current screen, or the lines that are
  270. marked.  Ask for the marked lines.  If you selected Alt-C, you'll be asked for
  271. the file name to copy the lines to.  If the file already exists, you'll be
  272. allowed to overwrite the existing file or append to it.
  273.  
  274. Note that you can say "LPT1:" or "PRN:" when you're doing Alt-C in which case
  275. the text will go to the printer.  The differences between Alt-C and Alt-P are:
  276.  
  277. (1) Alt-P will remove linefeeds during printing whereas Alt-C leaves them in.
  278.     Typically, Alt-C will result in double-spaced printing.
  279.  
  280. (2) Alt-P may reset the printer based on the width of the current document if a
  281.     READ.INI file is used.
  282.  
  283.